﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CatsAndMice.Models
{

    public enum State { START, ROLLED, MOVED }

    public class Mouse : AbstractModel
    {
        public Mouse(int id, string name)
            : base(id)
        {
            _name = name;
            CurrentPosition = 1;
            TargetPosition = 1;
            MayMove = false;
            CurrentState = State.START;
        }

        #region Player state
        private State _currentState;
        public State CurrentState
        {
            get
            {
                return _currentState;
            }
            set{
                SetProperty(ref _currentState, value, () => CurrentState);
            }
        }
        #endregion

        #region Player name
        private string _name;
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                SetProperty(ref _name, value, () => Name);
            }
        }
        #endregion

        #region Target position
        private int _targetPosition;
        public int TargetPosition
        {
            get
            {
                return _targetPosition;
            }
            set
            {
                SetProperty(ref _targetPosition, value, () => TargetPosition);
            }
        }
        #endregion

        #region Current position
        private int _currentPosition;
        public int CurrentPosition
        {
            get
            {
                return _currentPosition;
            }
            set
            {
                SetProperty(ref _currentPosition, value, () => CurrentPosition);
            }
        }
        #endregion

        #region May move
        private bool _mayMove;
        public bool MayMove
        {
            get
            {
                return _mayMove;
            }
            set
            {
                SetProperty(ref _mayMove, value, () => MayMove);
            }
        }
        #endregion

        #region Has won
        private bool _hasWon;
        public bool HasWon
        {
            get
            {
                return _hasWon;
            }
            set
            {
                SetProperty(ref _hasWon, value, () => HasWon);
            }
        }
        #endregion

        #region Statistical data, will be instrumented later
        public int TotalBittenSteps { get; set; }
        public int NoOfBites { get; set; }
        public int TotalClimbedSteps { get; set; }
        public int NoOfClimbs { get; set; }
        #endregion

        public override string ToString()
        {
            return Name;
        }
    }
}
